package oss.aliyun.springai.Configure;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: 陈杰
 * @Date: 2025/4/15 21:17
 * @Description:
 * @PackageName: oss.aliyun.springai.Configure
 * @Version: 1.0
 * @Since: 1.0
 */
@Configuration
public class MVCconfigure implements WebMvcConfigurer {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**")
                .allowedOrigins("*")
                .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
                .allowedHeaders("*");
    }
}
